3.159 \(\int \frac{(a+b \log (c x^n)) (d+e \log (f x^r))}{x} \, dx\)

Optimal. Leaf size=57 \[ \frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{2 b n}-\frac{e r \left (a+b \log \left (c x^n\right )\right )^3}{6 b^2 n^2} \]

[Out]

-(e*r*(a + b*Log[c*x^n])^3)/(6*b^2*n^2) + ((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/(2*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0717311, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {2301, 2366, 12, 2302, 30} \[ \frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{2 b n}-\frac{e r \left (a+b \log \left (c x^n\right )\right )^3}{6 b^2 n^2} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*(d + e*Log[f*x^r]))/x,x]

[Out]

-(e*r*(a + b*Log[c*x^n])^3)/(6*b^2*n^2) + ((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/(2*b*n)

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x} \, dx &=\frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{2 b n}-(e r) \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 b n x} \, dx\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{2 b n}-\frac{(e r) \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx}{2 b n}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{2 b n}-\frac{(e r) \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{2 b^2 n^2}\\ &=-\frac{e r \left (a+b \log \left (c x^n\right )\right )^3}{6 b^2 n^2}+\frac{\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{2 b n}\\ \end{align*}

Mathematica [A]  time = 0.0622617, size = 72, normalized size = 1.26 \[ \frac{1}{6} \log (x) \left (-3 \log (x) \left (a e r+b e r \log \left (c x^n\right )+b d n+b e n \log \left (f x^r\right )\right )+6 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+2 b e n r \log ^2(x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*(d + e*Log[f*x^r]))/x,x]

[Out]

(Log[x]*(2*b*e*n*r*Log[x]^2 + 6*(a + b*Log[c*x^n])*(d + e*Log[f*x^r]) - 3*Log[x]*(b*d*n + a*e*r + b*e*r*Log[c*
x^n] + b*e*n*Log[f*x^r])))/6

________________________________________________________________________________________

Maple [C]  time = 0.26, size = 1597, normalized size = 28. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*(d+e*ln(f*x^r))/x,x)

[Out]

-1/2*ln(x)^2*a*e*r-1/2*ln(x)^2*b*d*n-1/4*ln(x)*Pi^2*b*e*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*f)*csgn(I*x
^r)*csgn(I*f*x^r)+1/2*I*ln(x)*Pi*a*e*csgn(I*f)*csgn(I*f*x^r)^2+1/2*I*ln(x)*Pi*a*e*csgn(I*x^r)*csgn(I*f*x^r)^2+
1/2*I*ln(x)*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)^2-1/2*I*ln(x^n)*Pi*b*e*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)*ln(x)+(b
*e*ln(x)*ln(x^n)-1/2*b*e*n*ln(x)^2-1/2*I*ln(x)*Pi*b*e*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I*ln(x)*Pi*b*e*c
sgn(I*c)*csgn(I*c*x^n)^2+1/2*I*ln(x)*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*ln(x)*Pi*b*e*csgn(I*c*x^n)^3+ln(
x)*ln(c)*b*e+ln(x)*a*e)*ln(x^r)+1/2*I*ln(x)*Pi*ln(c)*b*e*csgn(I*f)*csgn(I*f*x^r)^2+1/2*I*ln(x)*Pi*ln(c)*b*e*cs
gn(I*x^r)*csgn(I*f*x^r)^2+1/2*I*ln(x)*Pi*ln(f)*b*e*csgn(I*c)*csgn(I*c*x^n)^2+1/2*I*ln(x)*Pi*ln(f)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*x^n)*csgn(I*c*x^n)*c
sgn(I*x^r)*csgn(I*f*x^r)^2+1/4*ln(x)*Pi^2*b*e*csgn(I*c)*csgn(I*c*x^n)^2*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)-1/
2*I*ln(x)*Pi*ln(f)*b*e*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)

________________________________________________________________________________________

Maxima [A]  time = 1.15506, size = 99, normalized size = 1.74 \begin{align*} \frac{b e \log \left (c x^{n}\right ) \log \left (f x^{r}\right )^{2}}{2 \, r} - \frac{b e n \log \left (f x^{r}\right )^{3}}{6 \, r^{2}} + \frac{b d \log \left (c x^{n}\right )^{2}}{2 \, n} + \frac{a e \log \left (f x^{r}\right )^{2}}{2 \, r} + a d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x,x, algorithm="maxima")

[Out]

1/2*b*e*log(c*x^n)*log(f*x^r)^2/r - 1/6*b*e*n*log(f*x^r)^3/r^2 + 1/2*b*d*log(c*x^n)^2/n + 1/2*a*e*log(f*x^r)^2
/r + a*d*log(x)

________________________________________________________________________________________

Fricas [A]  time = 0.810065, size = 188, normalized size = 3.3 \begin{align*} \frac{1}{3} \, b e n r \log \left (x\right )^{3} + \frac{1}{2} \,{\left (b e r \log \left (c\right ) + b e n \log \left (f\right ) + b d n + a e r\right )} \log \left (x\right )^{2} +{\left (b d \log \left (c\right ) + a d +{\left (b e \log \left (c\right ) + a e\right )} \log \left (f\right )\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x,x, algorithm="fricas")

[Out]

1/3*b*e*n*r*log(x)^3 + 1/2*(b*e*r*log(c) + b*e*n*log(f) + b*d*n + a*e*r)*log(x)^2 + (b*d*log(c) + a*d + (b*e*l
og(c) + a*e)*log(f))*log(x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c x^{n} \right )}\right ) \left (d + e \log{\left (f x^{r} \right )}\right )}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*(d+e*ln(f*x**r))/x,x)

[Out]

Integral((a + b*log(c*x**n))*(d + e*log(f*x**r))/x, x)

________________________________________________________________________________________

Giac [A]  time = 1.29686, size = 115, normalized size = 2.02 \begin{align*} \frac{1}{3} \, b n r e \log \left (x\right )^{3} + \frac{1}{2} \, b r e \log \left (c\right ) \log \left (x\right )^{2} + \frac{1}{2} \, b n e \log \left (f\right ) \log \left (x\right )^{2} + b e \log \left (c\right ) \log \left (f\right ) \log \left (x\right ) + \frac{1}{2} \, b d n \log \left (x\right )^{2} + \frac{1}{2} \, a r e \log \left (x\right )^{2} + b d \log \left (c\right ) \log \left (x\right ) + a e \log \left (f\right ) \log \left (x\right ) + a d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x,x, algorithm="giac")

[Out]

1/3*b*n*r*e*log(x)^3 + 1/2*b*r*e*log(c)*log(x)^2 + 1/2*b*n*e*log(f)*log(x)^2 + b*e*log(c)*log(f)*log(x) + 1/2*
b*d*n*log(x)^2 + 1/2*a*r*e*log(x)^2 + b*d*log(c)*log(x) + a*e*log(f)*log(x) + a*d*log(x)